package training.framework.presentation;

import javax.faces.context.ExceptionHandler;
import javax.faces.context.ExceptionHandlerFactory;

public class ExceptionHandlerFactoryImpl extends ExceptionHandlerFactory {
	private ExceptionHandlerFactory defaultFactory;
	
	public ExceptionHandlerFactoryImpl(ExceptionHandlerFactory defaultFactory) {
		this.defaultFactory = defaultFactory;
	}
	
	@Override
	public ExceptionHandler getExceptionHandler() {
		ExceptionHandler defaultHandler = defaultFactory.getExceptionHandler();
		return new ExceptionHandlerImpl(defaultHandler);
	}
}
